# Contributor: Sheila Aman <sheila@vulpine.house>
# Maintainer: Sheila Aman <sheila@vulpine.house>
pkgname=libotr
pkgver=4.1.1
pkgrel=5
pkgdesc="Off The Record Messaging, an encryption library for secure IM conversations"
options="!check"
url="http://otr.cypherpunks.ca/"
arch="all"
license="LGPL-2.1-only"
depends_dev="libgcrypt-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://www.cypherpunks.ca/otr/libotr-$pkgver.tar.gz
	socklen-t.patch
	"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="$pkgname tools"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="
c957206235b9f627542f23a645c822ea1b318d83fa655f41ed8d9a3c0dddf30b88f0ca82060026af155e48ecb13969dc9270831f20304669794151f666ae5cb0  libotr-4.1.1.tar.gz
0e17f0ffd91c54c7d8b9960b65696ebd4735d52c525ef46fb35e2eeb6a43bdc850e40132a9d2581fc51e2e3f7e88d8cf44e0d01c6792648e9d6dd0252b3cbb26  socklen-t.patch
"
